(function() {
    var a = mobiscroll.$;
    mobiscroll.themes.frame['material-dark'] = {
        baseTheme: 'material',
        showLabel: false,
        headerText: false,
        btnWidth: false,
        selectedLineBorder: 2,
        dateOrder: 'MMddyy',
        weekDays: 'min',
        deleteIcon: 'material-backspace',
        icon: {
            filled: 'material-star',
            empty: 'material-star-outline'
        },
        checkIcon: 'material-check',
        btnPlusClass: 'mbsc-ic mbsc-ic-material-keyboard-arrow-down',
        btnMinusClass: 'mbsc-ic mbsc-ic-material-keyboard-arrow-up',
        btnCalPrevClass: 'mbsc-ic mbsc-ic-material-keyboard-arrow-left',
        btnCalNextClass: 'mbsc-ic mbsc-ic-material-keyboard-arrow-right',
        onMarkupReady: function(b) {
            mobiscroll.themes.material.initRipple(a(b.target), '.mbsc-fr-btn-e', 'mbsc-fr-btn-d', 'mbsc-fr-btn-nhl');
        },
        onEventBubbleShow: function(e) {
            var b = a(e.eventList),
                c = a(e.target).closest('.mbsc-cal-row').index() < 2,
                d = a('.mbsc-cal-event-color', b).eq(c ? 0 : -1).css('background-color');
            a('.mbsc-cal-events-arr', b).css('border-color', c ? 'transparent transparent ' + d + ' transparent' : d + 'transparent transparent transparent');
        }
    };
    mobiscroll.themes.listview['material-dark'] = {
        baseTheme: 'material',
        onItemActivate: function(b) {
            mobiscroll.themes.material.addRipple(a(b.target), b.domEvent);
        },
        onItemDeactivate: function() {
            mobiscroll.themes.material.removeRipple();
        },
        onSlideStart: function(b) {
            a('.mbsc-ripple', b.target).remove();
        },
        onSortStart: function(b) {
            a('.mbsc-ripple', b.target).remove();
        }
    };
    mobiscroll.themes.menustrip['material-dark'] = {
        baseTheme: 'material',
        onInit: function() {
            mobiscroll.themes.material.initRipple(a(this), '.mbsc-ms-item', 'mbsc-btn-d', 'mbsc-btn-nhl');
        }
    };
    mobiscroll.themes.form['material-dark'] = {
        baseTheme: 'material',
        onControlActivate: function(d) {
            var c, b = a(d.target);
            if (b[0].type == 'button' || b[0].type == 'submit') {
                c = b;
            }
            if (b.attr('data-role') == 'segmented') {
                c = b.next();
            }
            if (b.hasClass('mbsc-stepper-control') && !b.hasClass('mbsc-step-disabled')) {
                c = b.find('.mbsc-segmented-content');
            }
            if (c) {
                mobiscroll.themes.material.addRipple(c, d.domEvent);
            }
        },
        onControlDeactivate: function() {
            mobiscroll.themes.material.removeRipple();
        }
    };
    mobiscroll.themes.progress['material-dark'] = {
        baseTheme: 'material'
    };
}());